package xian.woniuxy.hisbe.config;

import org.springframework.web.servlet.config.annotation.CorsRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author zhang
 * @time 2022/01/02 10:35:19
 */
public class MyWebMvcConfigurer implements WebMvcConfigurer {
    @Override
    public void addCorsMappings(CorsRegistry registry) {
        //允许访问当前主机任何资源
        registry.addMapping("/**")
                //允许任何请求源
                .allowedOrigins("*");
    }
}
